Mutable List
A generic ordered collection of elements that supports adding and removing elements.
Parameters
the type of elements contained in the list. The mutable list is invariant in its element type.
Functions
Adds all of the elements of the specified collection to the end of this list.
Checks if all elements in the specified collection are contained in this collection.
Returns the index of the last occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.
Returns a list iterator over the elements in this list (in proper sequence).
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified index.
Removes all of this collection's elements that are also contained in the specified collection.
Retains only the elements in this collection that are contained in the specified collection.
Properties
Inheritors
Extensions
Returns a reversed mutable view of the original mutable List. All changes made in the original list will be reflected in the reversed one and vice versa.
Removes the element at the specified index from this list. In Kotlin one should use the MutableList.removeAt function instead.
Removes all elements from this MutableList that match the given predicate.
Removes the first element from this mutable list and returns that removed element, or throws NoSuchElementException if this list is empty.
Removes the first element from this mutable list and returns that removed element, or returns null
if this list is empty.
Removes the last element from this mutable list and returns that removed element, or throws NoSuchElementException if this list is empty.
Removes the last element from this mutable list and returns that removed element, or returns null
if this list is empty.
Replaces each element in the list with a result of a transformation specified.
Retains only elements of this MutableList that match the given predicate.
Reverses elements in the list in-place.
Reverses elements in the list in-place.
Reverses elements in the list in-place.
Reverses elements in the list in-place.
Randomly shuffles elements in this list in-place using the specified random instance as the source of randomness.
Randomly shuffles elements in this mutable list using the specified random instance as the source of randomness.
Randomly shuffles elements in this mutable list.
Randomly shuffles elements in this list.
Randomly shuffles elements in this list.
Sorts elements in the list in-place according to their natural sort order.
Sorts elements in the list in-place according to their natural sort order.
Sorts elements in the list in-place according to their natural sort order.
Sorts elements in the list in-place descending according to natural sort order of the value returned by specified selector function.
Sorts elements in the list in-place descending according to their natural sort order.
Sorts elements in the list in-place according to the order specified with comparator.
Sorts elements in the list in-place according to the order specified with comparator.